(use Users Nitro Og)

# A user in the system.

(new User Object (do
  (set name String)
  (ann name 'type String)
  (set age Integer)

  # Login the user in the system.
    
  (set login (do (name password)
    (set status 'logged-in)
    (increase age)
    <ul>
    (each objects obj
      (p obj)
      {
      <li>#(name object)</li>
      this is really great lame ;-) 
      I love it!
      <br />
      }
    )
    </ul>
    (times 10 i
      (p i)
      (p 'This is really ' i ' times')
    )
  )) 
))

(set user (User new))
(new user User 'George' 'Moschovitis')

# Play with the user.

(new user User 'George' (do
  (set .age 17)
  (login)
))

(save user)
(load user User 1)
(load user User 'George')
(set user (load User 1))
(set user (find-by-age User 17 '>))

(user = (lookup User 1))

# A super user.

(new SuperUser User (do
  (is Rateable Ownable TimeStamped)
  (include Authorization)
  
  (def superuser? () true)
))

(with SuperUser (do
  (include Koko)
))


__END__

(each obj objects (do
	(print obj)
	(alert)
	(set a 4)
))

(each objects (do (obj)
	
)

Read macros

{..}      -> (do ..)
x = y     -> (set x y)
x[y]      -> (lookup x y)
x.y ..    -> (send x 'y ..)

Implementation

Value
Block
